// 根据label自定义元素的配置
const customConfig = [
  {
    labelKey: '申请',
    url: require('@/images/workflow/apply.png'),
    unUrl: require('@/images/workflow/unapply.png'),
  },
  {
    labelKey: '分析',
    url: require('@/images/workflow/analysis.png'),
    unUrl: require('@/images/workflow/unanalysis.png'),
  },
  {
    labelKey: '审批',
    url: require('@/images/workflow/approve.png'),
    unUrl: require('@/images/workflow/unapprove.png'),
  },
  {
    labelKey: '最终确认',
    url: require('@/images/workflow/final-confirm.png'),
    unUrl: require('@/images/workflow/unfinal-confirm.png'),
  },
  {
    labelKey: '实施',
    url: require('@/images/workflow/implementation.png'),
    unUrl: require('@/images/workflow/unimplementation.png'),
  },
  {
    labelKey: '实施确认',
    url: require('@/images/workflow/implementation-confirm.png'),
    unUrl: require('@/images/workflow/unimplementation-confirm.png'),
  },
  {
    labelKey: '交付确认',
    url: require('@/images/workflow/pay-confirm.png'),
    unUrl: require('@/images/workflow/unpay-confirm.png'),
  },
  {
    labelKey: '服务选择',
    url: require('@/images/workflow/service- selection.png'),
    unUrl: require('@/images/workflow/unservice- selection.png'),
  },
  {
    labelKey: '结单',
    url: require('@/images/workflow/statement.png'),
    unUrl: require('@/images/workflow/unstatement.png'),
  },
  {
    labelKey: '单位确认',
    url: require('@/images/workflow/unit-confirm.png'),
    unUrl: require('@/images/workflow/ununit-confirm.png'),
  },
];
const createArr = function(str, start, end, unit) {
  let arr = []; //保存每次截取后的字符串
  let counts = Math.ceil(str.length / unit); //循环截取的次数,向上取整

  for (let i = 0; i < counts; i++) {
    let newStr = str.substring(start, end);
    arr.push(newStr);
    start = end;
    end += 5;
  }
  return arr;
};
export { customConfig, createArr };
